--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -664,12 +664,9 @@ endif ( enable-oboe )
 unset ( WITH_READLINE CACHE )
 unset ( READLINE_LIBS CACHE )
 if ( enable-readline )
-pkg_check_modules ( READLINE readline QUIET IMPORTED_TARGET )
+pkg_check_modules ( READLINE libedit QUIET IMPORTED_TARGET )
 if ( READLINE_FOUND )
-    list( APPEND PC_REQUIRES_PRIV "readline")
-else ( READLINE_FOUND )
-    find_package ( READLINE )
-    set ( READLINE_FOUND ${HAVE_READLINE} )
+    list( APPEND PC_REQUIRES_PRIV "libedit")
 endif ( READLINE_FOUND )
 if ( READLINE_FOUND )
     set ( WITH_READLINE 1 )
--- a/src/utils/fluid_sys.c
+++ b/src/utils/fluid_sys.c
@@ -22,8 +22,7 @@
 
 
 #if WITH_READLINE
-#include <readline/readline.h>
-#include <readline/history.h>
+#include <editline/readline.h>
 #endif
 
 #ifdef DBUS_SUPPORT
